/*
  ******************************************************************************
  * @file    main.c
  * @author  APT AE Team
  * @version V1.15
  * @date    2022/11/30
  ******************************************************************************
  *THIS SOFTWARE WHICH IS FOR ILLUSTRATIVE PURPOSES ONLY WHICH PROVIDES 
  *CUSTOMER WITH CODING INFORMATION REGARDING THEIR PRODUCTS.
  *APT CHIP SHALL NOT BE HELD RESPONSIBILITY ADN LIABILITY FOR ANY DIRECT, 
  *INDIRECT DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF 
  *SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION 
  *CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.AND APT CHIP RESERVES 
  *THE RIGHT TO MAKE CHANGES IN THE SOFTWARE WITHOUT NOTIFICATION
  ******************************************************************************
  */
/* Includes ------------------------------------------------------------------*/
#include "config.h"

/* defines -------------------------------------------------------------------*/
/* externs Register-------------------------------------------------------------------*/
extern volatile U32_T Key_Map; //touch key press data 
/* externs function-------------------------------------------------------------------*/
extern void delay_nms(unsigned int t);
extern void APT32F102_init(void);

/***************************************************/
//main
/**************************************************/
int main(void) 
{
    char ch;

    chip_init_clock();

    chip_syscon_init();

    chip_disable_irq();

    log_port_init();
    log_print("log init done.\r\n");

    systick_init();
    log_print("systick init done.\r\n");

    chip_enable_irq();

    rc522_init();
    log_print("RC522 init done.\r\n");

    while(1)
    {
        systick_delay_ms(1000);
        mfg_card_poll();
      //  log_print("sys runing.\r\n");
    }
}
/******************* (C) COPYRIGHT 2019 APT Chip *****END OF FILE****/
